< Prev(J) / Next(K) > / View :

Filename: /text/sbasic/shared/03080202.xhp

(section: log) (bookmark: bm_id3149416)
Log function

Log 関数

Log Function [Runtime]
Log 関数 [実行時](hd_id3149416.1)

Returns the natural logarithm of a number.
与えられた数値の自然対数を返します。(par_id3145066.2)

(/section: log)

Syntax:
構文:(hd_id3159414.3)

Log (Number)
Log (Number)(par_id3154760.4)

Return value:
戻り値:(hd_id3149457.5)

Double
倍精度(par_id3150791.6)

Parameters:
パラメータ:(hd_id3151211.7)

Number: Any numeric expression that you want to calculate the natural logarithm for.
Number: 自然対数を計算する数値表式。(par_id3151041.8)

The natural logarithm is the logarithm to the base e. Base e is a constant with an approximate value of 2.718282...
自然対数とは、底を e とした対数のことです。底に使う e という記号は、2.718282... という定数値を示します。(par_id3150869.9)

You can calculate logarithms to any base (n) for any number (x) by dividing the natural logarithm of x by the natural logarithm of n, as follows:
その他の数値を底とする対数も、自然対数を基に計算できます。たとえば数値 (x) について数値 (n) を底とする対数を計算するには、数値 x の自然対数を、数値 n の自然対数で割ります。(par_id3153968.10)

Log n(x) = Log(x) / Log(n)
Log n(x) = Log(x) / Log(n)(par_id3145420.11)

(embed text/sbasic/shared/00000003.xhp#errorcode : linkinfo)

Error Codes

エラーコード(hd_id3152869.37)

(/embed text/sbasic/shared/00000003.xhp#errorcode)

(embed text/sbasic/shared/00000003.xhp#err5 : linkinfo)

5 Invalid procedure call
5 無効なプロシージャー呼び出しです (par_id3150891.41)

(/embed text/sbasic/shared/00000003.xhp#err5)

Example:
例:(hd_id3155131.12)

Sub ExampleLogExp
Sub ExampleLogExp(par_id3152463.13)

Dim a as Double
Dim a as Double(par_id3145750.14)

Dim const b1=12.345e12
Dim const b1=12.345e12(par_id3151116.15)

Dim const b2=1.345e34
Dim const b2=1.345e34(par_id3146985.16)

a=Exp( Log(b1)+Log(b2) )
a=Exp( Log(b1)+Log(b2) )(par_id3148616.17)

MsgBox "" & a & chr(13) & (b1*b2) ,0,"Multiplication by logarithm function"
MsgBox "" & a & chr(13) & (b1*b2) ,0,"Multiplication by logarithm function"(par_id3149262.18)

end sub
end sub(par_id3155411.19)


< Prev / Next >